package com.winz.cultureapp.imgloader;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

/**
 * Created by terry on 2018/1/8.
 * 图片加载工具类
 */

public class ImageLoadUtil<T extends Object> {

    private static ImageLoadUtil loadUtil = null;
    private Context context;
    private T t;

    public static ImageLoadUtil getInstance(){
        if (loadUtil == null){
            loadUtil = new ImageLoadUtil();
        }
        return loadUtil;
    }

    public ImageLoadUtil with(Context context){
        this.context = context;
        return this;
    }
    public ImageLoadUtil load(T t){
        this.t = t;
        return this;
    }





    public void into(ImageView tagView){
        Glide.with(context)
                .load(t)
                .into(tagView);
    }
}
